package com.coderman.domainservice.blogtopic.domain.gataway;

import com.coderman.domainservice.blogtopic.domain.model.entity.BlogAggregateBO;
import com.coderman.domainservice.blogtopic.domain.model.entity.BlogBO;
import com.coderman.domainservice.blogtopic.domain.model.entity.BlogCommentBO;
import com.coderman.domainservice.blogtopic.domain.model.entity.BlogSpecialColumnBO;

import java.util.List;

/**
 * Description:
 * date: 2021/3/29
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 * 博客数据操作仓库--->聚合根
 */
public interface BlogRepository {
    /**
     * 发布博客
     * @param blogBO
     */
    void publishBlog(BlogBO blogBO);

    /**
     * 处理博客状态
     * @param blogId
     * @param status
     */
    void dealBlog(Long blogId,int status);

    /**
     * 发布评论
     * @param blogCommentBO
     */
    void publishComment(BlogCommentBO blogCommentBO);


    /**
     * 创建专栏
     * @param blogSpecialColumnBO
     */
    void publishBlogSpecialColumn(BlogSpecialColumnBO blogSpecialColumnBO);

    /**
     * 获取用户下的博客列表
     * @param userId
     * @return
     */
    List<BlogAggregateBO> findBlog(Long userId);

    /**
     * 根据博客ID查询博客信息，包括评论，博客所属专栏
     *
     * @param blogId
     * @return
     */
    BlogAggregateBO findOneBlog(long blogId);


}
